<!--
 * @Author: 胡海
 * @Date: 2020-11-18 20:05:16
 * @LastEditors: 胡海
 * @LastEditTime: 2020-11-18 20:41:48
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>指令v-bind v-on</title>
</head>
<body>
    <div id="app">
        <input type="text" v-on:input="inputHandle">
        <p>{{ message}}</p>
        <p>{{fn()}}</p>
    </div>
    <script>
        var message = 'hello miaov'; 
        var vm = new vue({
            el: '#app',
            data:{
                message
            },
            methods: {
                fn(){
                    console.log(123);
            },
            inputHandle(){
                console.log('触发了input')
            }
            }  
        })
        //vue中绑定事件使用指令绑定
        //v-on：事件名=：“表达式”事件写在行间
    </script>
</body>
</html>